import { createStore } from 'vuex'

export default createStore({
    state: {
        cartList:[],
        isDelete:true,
        edit:true,
        orderList:[]
    },
    mutations: {
        addcart(state,value){
            state.cartList = value
        },
        changeDelete(state){
            state.isDelete = !state.isDelete
        },
        delete(state,value){
            state.cartList = value
        },
        edit(state,value){
            if(value){
                state.edit = true
            }else{
                state.edit = !state.edit
            }
        },
        pay(state, value){
            state.orderList = value
        },
    },
    actions:{}
})